import 'package:xvideos/hj_model/video_model.dart';

class LikeRecordListResp {
  List<LikeRecordModel>? list;
  bool? hasNext;
  LikeRecordListResp.fromJson(Map<String, dynamic>? json) {
    json ??= {};
    hasNext = json['hasNext'];
    if (json['list'] is List) {
      list = (json['list'] as List).map((e) => LikeRecordModel.fromJson(e)).toList();
    }
  }
}

class LikeRecordModel {
  // 点赞者名字
  final String lName;
  // 点赞者头像
  final String lPortrait;
  // 点赞时间
  final String lTime;
  // 点赞类型
  final String lType;
  // 点赞者id
  final int lUID;
  // 视频信息
  final VideoModel? videoModel;

  LikeRecordModel({
    required this.lName,
    required this.lPortrait,
    required this.lTime,
    required this.lType,
    required this.lUID,
    this.videoModel,
  });

  factory LikeRecordModel.fromJson(Map<String, dynamic> json) {
    return LikeRecordModel(
      lName: json['lName'] ?? '',
      lPortrait: json['lPortrait'] ?? '',
      lTime: json['lTime'] ?? '',
      lType: json['lType'] ?? '',
      lUID: json['lUID'] ?? 0,
      videoModel: json['videoModel'] != null ? VideoModel.fromJson(json['videoModel']) : null,
    );
  }
}
